﻿@model List<Common.Contract.Customer.Record.CountAlertCustomerRecord>
<div class="row tile_count top_tiles">
    @foreach (var item in Model)
    {
        if (item.CountCust > 0)
        {
            if (item.IsDaily)
            {
                <div class="col-lg-3 col-sm-3 col-xs-6 ">
                    <div class="tile_stats_count tile-stats">
                        <a href="@item.AlertUrl">
                            <span class="count_top" data-toggle="tooltip" data-placement="top" title="" data-original-title="@item.AlertDescription"><i class="@item.AlertCss"></i> @item.AlertName</span>
                            <div class="count">@item.CountCust</div>
                            <span class="count_bottom"><i class="green">@item.CountNewCust</i> @SMECustomerWebsite.Core.Resources.Resource.PopupToday</span>
                        </a>
                    </div>
                </div>
            }
            else
            {
                <div class="col-lg-3 col-sm-3 col-xs-6 ">
                    <div class="tile_stats_count tile-stats">
                        <a href="@item.AlertUrl">
                            <span class="count_top" data-toggle="tooltip" data-placement="top" title="" data-original-title="@item.AlertDescription"><i class="@item.AlertCss"></i> @item.AlertName</span>
                            <div class="count">@item.CountCust</div>
                            <span class="count_bottom">
                                @if (item.CountNewCust < 0)
                                {
                                    <i class="red"><i class="fa fa-sort-desc"></i>@item.CountNewCust</i>
                                }
                                else
                                {
                                    <i class="green"><i class="fa fa-sort-asc"></i>@item.CountNewCust</i>
                                } @SMECustomerWebsite.Core.Resources.Resource.PopupLastmonth
                            </span>
                        </a>
                    </div>
                </div>
            }
        }
    }

</div>